import { getFormatterPrice } from '@const/filter'
// 应付单列表
// tab切换
export const indexTabsArr = [
  { lab: '未处理', val: 0, badge: { value: null } },
  { lab: '待付款', val: 1, badge: { value: null } },
  { lab: '已付款', val: 2, badge: { value: null } },
  { lab: '已撤销', val: 3, badge: { value: null } },
  { lab: '全部', val: '', badge: { value: null } }
]
// 列表表头
export const columsData = [
  {
    width: '55',
    type: 'selection',
    selectable: row => row.orderBussStatusName === '未处理'
  },
  // { prop: 'orderBussCode', label: '采购单号', 'min-width': 170, 'show-overflow-tooltip': false },
  // { prop: 'relationCode', label: '关联订单号', 'min-width': 170, 'show-overflow-tooltip': true },
  { prop: 'invoiceName', label: '发票抬头', 'min-width': 170, 'show-overflow-tooltip': true },
  { prop: 'invoiceCode', label: '发票代码', width: 150 },
  { prop: 'invoiceNo', label: '发票编号', width: 150 },
  { prop: 'invoiceDate', label: '开票日期', width: 150 },
  { prop: 'invoiceAmountTax', label: '发票金额(元)', 'min-width': 120, formatter: row => getFormatterPrice(row.invoiceAmountTax) },
  { prop: 'prodTotalAmount', label: '关联产品金额(元)', 'min-width': 140, formatter: row => getFormatterPrice(row.prodTotalAmount) },
  // { prop: 'distributorName', label: '配送商', 'min-width': 120, 'show-overflow-tooltip': true },
  { prop: 'prodVarietyCount', label: '品种数', width: 100 },
  { prop: 'prodTotalCount', label: '产品总数', width: 100 },
  { prop: 'distributorName', label: '开票企业', 'min-width': 120, 'show-overflow-tooltip': true },
  { prop: 'createdAt', label: '创建时间', width: 150 },
  { prop: 'orderBussStatusName', label: '应付单状态', width: 120 },
  { prop: 'action', label: '操作', width: 100, fixed: 'right' }
]
